﻿@model IList<ProductOverviewModel>

@using Nop.Web.Models.Catalog;

@if (Model.Count > 0)
{
    <div class="box">
        <div class="box-heading">
            <span>@T("HomePage.Products")</span>
        </div>
        <div class="box-content">
             <div class="product-grid home-page-product-grid box-product">
               @{
                        var curIndex = 0;
                        var columnCount = 1;
                        foreach (var product in Model)
                        {
                            var margin = "";
                            if (columnCount == 4){
                                margin = "margin-right:0";
                                columnCount = 0;
                            }else{
                                margin = "";
                            }                                                            
                            <div style="width:218px;@margin">
                                @Html.Partial("_ProductBox", product)
                            </div>        
                            columnCount++;
                            curIndex++;
                        }
                }
            </div>
        </div>
    </div>
    
}